@extends('default.mobile.layouts.personalPublic')
@section('title','个人会员中心 | '.Site::get('webname'))
@section('tag','个人账户中心')

{{--首页css--}}
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/mobile/personal/common.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/mobile/personal/welcome.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('/vendor/webuploader/dist/webuploader_img.css')}}">
@endsection
{{--主体内容--}}
@section('content')
    <div class="personalInfo">
        @if(!empty($resumeInfo->id))
            <div class="avatar" id="avatar"><img src="{{$resumeInfo->avatar}}" alt=""></div>
            <dl>
                <a href="{{url('mobile/personal/resume_manage?resume_id='.$resumeInfo->id)}}">
                    <dt>{{$resumeInfo->name or ''}}<span>默认简历</span></dt>
                    <dd>
                        @if(!empty($resumeInfo->education))
                            <span>{{$resumeInfo->education}}</span>
                        @endif
                        @if(!empty($resumeInfo->work_year))
                            <b>|</b><span>{{$resumeInfo->work_year}}</span>
                        @endif
                        @if(!empty($resumeInfo->job_status))
                            <b>|</b><span>{{str_limit($resumeInfo->job_status,18)}}</span>
                        @endif
                    </dd>
                </a>
            </dl>
        @else
            <div class="immediately"><span>您还没有创建简历。马上注册获得更多机会！</span></div>
            <div class="i_create"><p><a href="{{url('mobile/personal/resume_create')}}">立即创建</a></p></div>
        @endif
    </div>

    <div class="fill">
        <ul>
            <li><a href="{{url('mobile/personal/my_resume')}}"><i class="icon01"></i><span class="title">我的简历</span>
                    @if($resumeInfo->resumeCount == 0)
                        <span class="tip">必须先填写个人信息</span>
                    @else
                        <span class="message">{{$resumeInfo->resumeCount}}</span>
                    @endif
                </a>
            </li>
            <li><a href="{{url('mobile/personal/interview')}}"><i class="icon02"></i><span
                            class="title">面试通知</span><span
                            class="message">{{$resumeInfo->interviewCount}}</span></a>
            </li>
            <li><a href="{{url('mobile/personal/favorites')}}"><i class="icon03"></i><span
                            class="title">职位收藏夹</span><span
                            class="message">{{$resumeInfo->favoriteCount}}</span></a>
            </li>
            <li><a href="{{url('mobile/personal/resume_send')}}"><i class="icon04"></i><span
                            class="title">投递记录</span><span
                            class="message">{{$resumeInfo->resumeSendCount}}</span></a>
            </li>
            <li><a href="{{url('mobile/personal/browse_resume')}}"><i class="icon05"></i><span
                            class="title">谁浏览了我</span><span
                            class="message">{{$resumeInfo->browseResumeCount}}</span></a></li>
            <li><a href="{{url('mobile/personal/browse_job')}}"><i class="icon06"></i><span
                            class="title">浏览记录</span><span
                            class="message">{{$resumeInfo->browseJobCount}}</span></a>
            </li>
            <li><a href="{{url('mobile/personal/search')}}"><i class="icon07"></i><span
                            class="title">搜索器</span><span
                            class="message">{{$resumeInfo->searchEngineCount}}</span></a></li>
            <li><a href="{{url('mobile/personal/set_account')}}"><i class="icon08"></i><span
                            class="title">账号设置</span><span class="tip">基本资料、账户安全</span></a></li>
        </ul>
    </div>
    {{--退出登录--}}
    <div class="foot">
        <div class="logout">
            <a href="{{url('mobile/personal/logout')}}">退出登录</a>
        </div>
    </div>
@endsection

@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/vendor/webuploader/dist/webuploader.html5only.min.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/personal/upavatar.js')}}"></script>
    <script type="text/javascript">
        var _token = '{{csrf_token()}}';
        uploadAvatar('#avatar');
    </script>
@endsection